﻿@model Blog.Models.ArticleCreateViewModel
@{
    ViewBag.Title = "Edition";
}

<div class="container">
    <h2>@ViewBag.Message</h2>
    <h3>Veuillez modifier les champs : </h3><hr /><br />

    <div class="alert alert-info fade in">
        <button class="close fade" data-dismiss="alert">×</button>
        <strong>Info!</strong> Tous les champs sont obligatoires.
    </div>

    @using (@Html.BeginForm())
    {
        @Html.ValidationSummary()
        <table class="form-inline">
            <tr><td><strong>Titre </strong></td><td>@Html.EditorFor(x => x.Title)</td></tr>
            <tr><td><strong>Contenu </strong></td><td>@Html.TextAreaFor(x => x.Content)</td></tr>
            <tr><td><strong>Categorie </strong></td><td>@Html.DropDownListFor(x => x.CategoryID, new SelectList(ViewBag.Category, "ID", "Name"))</td></tr>
            <tr><td></td></tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
            <tr><td><button class="btn btn-success btn-medium" type="submit"><i class="icon-ok icon-white"></i> Enregistrer</button></td><td></td></tr>
        </table>
        @Html.HiddenFor(x => x.ID)
    }

    <a href="../" class="btn btn-warning btn-medium"><i class="icon-chevron-left icon-white"></i> Revenir à la liste</a>
</div>

<script src="@Url.Content("~/Scripts/bootstrap-alert.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/bootstrap-transition.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/bootstrap-validation.js")" type="text/javascript"></script>